/*
package com.dnjn.happiness.emo.controller;

import com.dnjn.happiness.system.api.domain.SysUser;
import com.dnjn.happiness.emo.domain.User;
import com.dnjn.happiness.emo.service.IUserService;
import com.dnjn.happiness.sys.domain.SysTeam;
import com.dnjn.happiness.sys.service.ISysTeamService;
import com.dnjn.happiness.sys.utils.GenerateInviteCode;
import com.dnjn.happiness.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/open")
public class OpenTeamController {

    @Autowired
    private ISysUserService userService;

    @Autowired
    private ISysTeamService sysTeamService;

    @Autowired
    private IUserService emoUserService;

    @Autowired
    private GenerateInviteCode generateInviteCode;


    */
/**
     * emo_user & sys_team 表增量添加数据
     *//*

    @GetMapping("/initializationTableDate")
    public void initializationTableDate(){
        List<SysUser> listAll = userService.getUserListAll();
        for (SysUser sysUser : listAll) {
            SysTeam team = sysTeamService.lambdaQuery().eq(SysTeam::getUserId, sysUser.getUserId()).eq(SysTeam::getDeleted, "0").one();
            if (null == team){
                String inviteCode = generateInviteCode.getInviteCode();
                sysTeamService.save(new SysTeam().setUserId(sysUser.getUserId()).setInviteCode(inviteCode));
            }
            User emoUser = emoUserService.lambdaQuery().eq(User::getUserId,sysUser.getUserId()).eq(User::getDeleted, "0").one();
            if (null == emoUser){
                emoUserService.save(new User().setUserId(sysUser.getUserId()).setHappinessScore(0L).setHlbean(0L).setHlbeanToday(0L));
            }

        }
    }

}
*/
